package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.domain.RTbMerchantServiceRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbMerchantServiceRecordMapper;
import com.ruoyi.system.domain.TbMerchantServiceRecord;
import com.ruoyi.system.service.ITbMerchantServiceRecordService;

/**
 * 商家服务详情Service业务层处理
 * 
 * @author lzd
 * @date 2024-09-11
 */
@Service
public class TbMerchantServiceRecordServiceImpl implements ITbMerchantServiceRecordService 
{
    @Autowired
    private TbMerchantServiceRecordMapper tbMerchantServiceRecordMapper;

    /**
     * 查询商家服务详情
     * 
     * @param infoId 商家服务详情主键
     * @return 商家服务详情
     */
    @Override
    public TbMerchantServiceRecord selectTbMerchantServiceRecordByInfoId(Long infoId)
    {
        return tbMerchantServiceRecordMapper.selectTbMerchantServiceRecordByInfoId(infoId);
    }

    @Override
    public List<RTbMerchantServiceRecord> selectRTbMerchantServiceRecordList(RTbMerchantServiceRecord rTbMerchantServiceRecord) {
        return tbMerchantServiceRecordMapper.selectRTbMerchantServiceRecordList(rTbMerchantServiceRecord);
    }

    /**
     * 查询商家服务详情列表
     * 
     * @param tbMerchantServiceRecord 商家服务详情
     * @return 商家服务详情
     */
    @Override
    public List<TbMerchantServiceRecord> selectTbMerchantServiceRecordList(TbMerchantServiceRecord tbMerchantServiceRecord)
    {
        return tbMerchantServiceRecordMapper.selectTbMerchantServiceRecordList(tbMerchantServiceRecord);
    }

    /**
     * 新增商家服务详情
     * 
     * @param tbMerchantServiceRecord 商家服务详情
     * @return 结果
     */
    @Override
    public int insertTbMerchantServiceRecord(TbMerchantServiceRecord tbMerchantServiceRecord)
    {
        tbMerchantServiceRecord.setCreateTime(DateUtils.getNowDate());
        return tbMerchantServiceRecordMapper.insertTbMerchantServiceRecord(tbMerchantServiceRecord);
    }

    /**
     * 修改商家服务详情
     * 
     * @param tbMerchantServiceRecord 商家服务详情
     * @return 结果
     */
    @Override
    public int updateTbMerchantServiceRecord(TbMerchantServiceRecord tbMerchantServiceRecord)
    {
        tbMerchantServiceRecord.setUpdateTime(DateUtils.getNowDate());
        return tbMerchantServiceRecordMapper.updateTbMerchantServiceRecord(tbMerchantServiceRecord);
    }

    /**
     * 批量删除商家服务详情
     * 
     * @param infoIds 需要删除的商家服务详情主键
     * @return 结果
     */
    @Override
    public int deleteTbMerchantServiceRecordByInfoIds(Long[] infoIds)
    {
        return tbMerchantServiceRecordMapper.deleteTbMerchantServiceRecordByInfoIds(infoIds);
    }

    /**
     * 删除商家服务详情信息
     * 
     * @param infoId 商家服务详情主键
     * @return 结果
     */
    @Override
    public int deleteTbMerchantServiceRecordByInfoId(Long infoId)
    {
        return tbMerchantServiceRecordMapper.deleteTbMerchantServiceRecordByInfoId(infoId);
    }
}
